package com.hoshiicloud.commissioncalculation.feign;

import com.hoshiicloud.commissioncalculation.feign.hystrix.HystrixUserFeignFallback;
import com.hoshiicloud.common.rpc.Response;
import com.hoshiicloud.saleorder.dto.PlatStoreDTO;
import com.hoshiicloud.user.entity.store.PlatStore;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author ygd
 * @title: UserFeignService
 * @projectName hoshiicloud
 * @description: 用户服务 feignClient
 * @date 2019/9/6
 */
@FeignClient(name = "hoshiicloud-user", fallback = HystrixUserFeignFallback.class)
public interface UserFeignService {

    /**
     * 获取店铺详情
     *
     * @param id 店铺ID
     * @return Response<PlatStoreDTO>
     */
    @GetMapping(value = "/store/plat-store/{id}")
    Response<PlatStoreDTO> queryById(@PathVariable("id") Long id);

    /**
     * 批量更新店铺信息
     *
     * @param platStoreList 店铺列表
     * @return Response<List < Long>>
     */
    @RequestMapping(value = "/store/plat-store/batchUpdateStores", method = RequestMethod.POST)
    Response<List<Long>> updateBatchStores(@RequestBody List<PlatStore> platStoreList);

}
